import 'package:get/get.dart';

import '../middleware/auth_middleware.dart';
import '../modules/adddongtai/bindings/adddongtai_binding.dart';
import '../modules/adddongtai/views/adddongtai_view.dart';
import '../modules/chat/bindings/chat_binding.dart';
import '../modules/chat/views/chat_view.dart';
import '../modules/dongtai/bindings/dongtai_binding.dart';
import '../modules/dongtai/views/dongtai_view.dart';
import '../modules/dongtaixiangqing/bindings/dongtaixiangqing_binding.dart';
import '../modules/dongtaixiangqing/views/dongtaixiangqing_view.dart';
import '../modules/home/bindings/home_binding.dart';
import '../modules/home/views/home_view.dart';
import '../modules/jingdianxiangqing/bindings/jingdianxiangqing_binding.dart';
import '../modules/jingdianxiangqing/views/jingdianxiangqing_view.dart';
import '../modules/jubao/bindings/jubao_binding.dart';
import '../modules/jubao/views/jubao_view.dart';
import '../modules/kefu/bindings/kefu_binding.dart';
import '../modules/kefu/views/kefu_view.dart';
import '../modules/liuyan/bindings/liuyan_binding.dart';
import '../modules/liuyan/views/liuyan_view.dart';
import '../modules/login/bindings/login_binding.dart';
import '../modules/login/views/login_view.dart';
import '../modules/mine/bindings/mine_binding.dart';
import '../modules/mine/views/mine_view.dart';
import '../modules/mydongtai/bindings/mydongtai_binding.dart';
import '../modules/mydongtai/views/mydongtai_view.dart';
import '../modules/remenjingdian/bindings/remenjingdian_binding.dart';
import '../modules/remenjingdian/views/remenjingdian_view.dart';
import '../modules/script/bindings/script_binding.dart';
import '../modules/script/views/script_view.dart';
import '../modules/splash/bindings/splash_binding.dart';
import '../modules/splash/views/splash_view.dart';
import '../modules/tabbat/bindings/tabbat_binding.dart';
import '../modules/tabbat/views/tabbat_view.dart';
import '../modules/userinfo/bindings/userinfo_binding.dart';
import '../modules/userinfo/views/userinfo_view.dart';
import '../modules/web/bindings/web_binding.dart';
import '../modules/web/views/web_view.dart';
import '../modules/xiangqu/bindings/xiangqu_binding.dart';
import '../modules/xiangqu/views/xiangqu_view.dart';
import '../modules/zhuxiao/bindings/zhuxiao_binding.dart';
import '../modules/zhuxiao/views/zhuxiao_view.dart';

part 'app_routes.dart';

class AppPages {
  AppPages._();

  static const INITIAL = Routes.SPLASH;

  static final routes = [
    GetPage(
      name: _Paths.LOGIN,
      page: () => LoginView(),
      binding: LoginBinding(),
    ),
    GetPage(
      name: _Paths.SPLASH,
      page: () => SplashView(),
      binding: SplashBinding(),
      preventDuplicates: true,
      transition: Transition.fade,
    ),
    GetPage(
      name: _Paths.WEB,
      page: () => WebView(),
      binding: WebBinding(),
    ),
    GetPage(
      name: _Paths.SCRIPT,
      page: () => ScriptView(),
      binding: ScriptBinding(),
    ),
    GetPage(
      name: _Paths.HOME,
      page: () => HomeView(),
      binding: HomeBinding(),
    ),
    GetPage(
      name: _Paths.TABBAT,
      page: () => TabbarView(),
      binding: TabbatBinding(),
      middlewares: [
        EnsureAuthMiddleware(),
      ],
    ),
    GetPage(
      name: _Paths.XIANGQU,
      page: () => XiangquView(),
      binding: XiangquBinding(),
    ),
    GetPage(
      name: _Paths.DONGTAI,
      page: () => DongtaiView(),
      binding: DongtaiBinding(),
    ),
    GetPage(
      name: _Paths.MINE,
      page: () => MineView(),
      binding: MineBinding(),
    ),
    GetPage(
      name: _Paths.USERINFO,
      page: () => UserinfoView(),
      binding: UserinfoBinding(),
    ),
    GetPage(
      name: _Paths.MYDONGTAI,
      page: () => MydongtaiView(),
      binding: MydongtaiBinding(),
    ),
    GetPage(
      name: _Paths.ADDDONGTAI,
      page: () => AdddongtaiView(),
      binding: AdddongtaiBinding(),
    ),
    GetPage(
      name: _Paths.KEFU,
      page: () => KefuView(),
      binding: KefuBinding(),
    ),
    GetPage(
      name: _Paths.ZHUXIAO,
      page: () => ZhuxiaoView(),
      binding: ZhuxiaoBinding(),
    ),
    GetPage(
      name: _Paths.REMENJINGDIAN,
      page: () => RemenjingdianView(),
      binding: RemenjingdianBinding(),
    ),
    GetPage(
      name: _Paths.JINGDIANXIANGQING,
      page: () => JingdianxiangqingView(),
      binding: JingdianxiangqingBinding(),
    ),
    GetPage(
      name: _Paths.DONGTAIXIANGQING,
      page: () => DongtaixiangqingView(),
      binding: DongtaixiangqingBinding(),
    ),
    GetPage(
      name: _Paths.CHAT,
      page: () => ChatView(),
      binding: ChatBinding(),
    ),
    GetPage(
      name: _Paths.JUBAO,
      page: () => JubaoView(),
      binding: JubaoBinding(),
    ),
    GetPage(
      name: _Paths.LIUYAN,
      page: () => LiuyanView(),
      binding: LiuyanBinding(),
    ),
  ];
}
